/*
 * debug.scala
 */

package acorn.jash.commands

import acorn.jash.Cmd
import acorn.jash.Shell
import acorn.jash.JashException

class debug extends Cmd {
 
 override def exec {
    if (args.length == 0)
      out putln ("Debugging is " +
                 (if (Shell.debugging) "on." else "off."))
    else
      args(0) match {
        case "on" => Shell.debugging = true
        case "off" => Shell.debugging = false
        case _ => out putln "Usage: debug on|off"
      }
  }

}
